From 379e2ea7a9fea1d6412a6227039a76aef4c83d34 Mon Sep 17 00:00:00 2001 From: "jfehlig@jfehlig2.provo.novell.com" Date: Tue, 12 Dec 2006 15:28:23 -0700 Subject: [PATCH] Allow adding VIF devices to a VM when in halted state. Do not attempt to create the VIF device if VM is in halted state. Signed-off-by: Jim Fehlig --- tools/python/xen/xend/XendDomainInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 8653279bd8..de66eb4e75 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -2045,7 +2045,7 @@ class XendDomainInfo: if not dev_uuid: raise XendError('Failed to create device') - if self.state in (DOM_STATE_HALTED,): + if self.state in (XEN_API_VM_POWER_STATE_RUNNING,): sxpr = self.info.device_sxpr(dev_uuid) devid = self.getDeviceController('vif').createDevice(sxpr) raise XendError("Device creation failed") -- 2.30.2